package avicit.bdp.dms.das.dto;

import avicit.bdp.common.base.BaseDTO;
import avicit.platform6.core.annotation.log.FieldRemark;
import avicit.platform6.core.annotation.log.Id;
import avicit.platform6.core.annotation.log.LogField;
import avicit.platform6.core.properties.PlatformConstant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.StringUtils;

import javax.persistence.Column;
import javax.persistence.Table;

/**
 *  保留字列表
 *
 * @金航数码科技有限责任公司
 * @作者：developer
 * @邮箱：developer@avic-digital.com
 * @修改记录：
 */
@ApiModel(value = "ColumnReservedDTO", description = "bdp_das_column_reserved")
@Table(name = "bdp_das_column_reserved")
public class ColumnReservedDTO extends BaseDTO {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @Id
    @LogField
    @ApiModelProperty(value = "id", name = "id")
    @FieldRemark(column = "id", field = "id", name = "主键")
    @javax.persistence.Id
    @Column(name = "id")
    private String id;

    /**
     * 数据库类型
     */
    @LogField
    @ApiModelProperty(value = "数据库类型", name = "type")
    @FieldRemark(column = "type", field = "type", name = "数据库类型")
    @Column(name = "type")
    private String type;

    /**
     * 名称
     */
    @LogField
    @ApiModelProperty(value = "名称", name = "name")
    @FieldRemark(column = "name", field = "name", name = "名称")
    @Column(name = "name")
    private String name;



    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getLogFormName() {
        if (StringUtils.isEmpty(super.logFormName)) {
            return "bdp_das_column_reserved";
        } else {
            return super.logFormName;
        }
    }

    public String getLogTitle() {
        if (StringUtils.isEmpty(super.logTitle)) {
            return "bdp_das_column_reserved";
        } else {
            return super.logTitle;
        }
    }

    public PlatformConstant.LogType getLogType() {
        if (super.logType == null) {
            return PlatformConstant.LogType.module_operate;
        } else {
            return super.logType;
        }
    }

}
